package ru.cod.rs.exmpls.main.interfaces.impl;

import ru.cod.rs.exmpls.main.interfaces.Graphics.PixmapFormat;
import ru.cod.rs.exmpls.main.interfaces.Pixmap;
import android.graphics.Bitmap;

public class PixmapImpl implements Pixmap {
	Bitmap bitmap;
	PixmapFormat format;

	public PixmapImpl(Bitmap bitmap, PixmapFormat format) {
		this.bitmap = bitmap;
		this.format = format;
	}

	@Override
	public int getWidth() {
		return bitmap.getWidth();
	}

	@Override
	public int getHeight() {

		return bitmap.getHeight();
	}

	@Override
	public PixmapFormat getFormat() {

		return format;
	}

	@Override
	public void dispose() {
		bitmap.recycle();

	}

}
